package com.lottery.service;

import com.lottery.dao.WinningLotteryNumbersDao;
import com.lottery.pojo.TableWinningLotteryNumbers;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class WinningLotteryNumbersService {

    @Autowired
    WinningLotteryNumbersDao winningLotteryNumbersDao;

    public void addWinningLotteryNumbers(TableWinningLotteryNumbers numbers) {
        winningLotteryNumbersDao.addWinningLotteryNumbers(numbers);
    }

    public void updateWinningLotteryNumbers(TableWinningLotteryNumbers numbers) {
        winningLotteryNumbersDao.updateWinningLotteryNumbers(numbers);
    }

    public void update432(TableWinningLotteryNumbers numbers) {
        winningLotteryNumbersDao.update432(numbers);
    }

    public List<TableWinningLotteryNumbers> getWinningLotteryNumbers(String startTime, String endTime) {
        return winningLotteryNumbersDao.getWinningLotteryNumbers(startTime, endTime);
    }

    ///
    public TableWinningLotteryNumbers getByDateRegionId(String date, int region_id) {
        return winningLotteryNumbersDao.getByDateRegionId(date, region_id);
    }

    public TableWinningLotteryNumbers getNumber(int region_id, String date) {
        return winningLotteryNumbersDao.getNumber(region_id, date);
    }
}
